package org.example.printstream;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.io.PrintWriter;

/**
 * 打印流只有输出流，没有输入流
 */
public class MyPrintStream {
    public static void main(String[] args) throws FileNotFoundException {

        String path = "D:\\1My\\MyJava\\io-stream-demo\\src\\main\\resources\\print.txt";
        PrintWriter printWriter = new PrintWriter(path);

        //写入了
        printWriter.write("AAAAAAAAAAAAAA");

        //字符流记得刷新，然后文件中就会产生东西
        printWriter.flush();
        printWriter.close();


    }
}
